<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo $this->pageTitle; ?></title>
        <?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

        <!-- css, js -->
        <link rel="stylesheet" media="all" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/960/reset.css" />
        <link rel="stylesheet" media="all" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/960/text.css" />
        <link rel="stylesheet" media="all" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/960/960.css" />
        <link rel="stylesheet" media="all" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
        <link rel="stylesheet" media="all" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
        <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-ui-1.8.17.custom.min.js" type="text/javascript"></script>
        <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/main.js" type="text/javascript"></script>
        <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>

        <script>
            $(document).ready(function() {
                $("#tabs").tabs();
                
                // Load ket qua xo so
                $.ajax({
                    url: '<?php echo Yii::app()->request->baseUrl; ?>/index.php/backend/admin/LayDuLieuLoDe',
                    beforeSend: function()
                    {
                        $('#ketquasx').html('<img src="<?php echo Yii::app()->request->baseUrl; ?>/images/ajax-loader.gif"/>');
                    },
                    success: function(data)
                    {
                       $('#ketquasx').html(data);
                    }
                });
                
                // Lấy danh sách phong thần
                $.ajax({
                    url: '<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/LayDanhSachPhongThan',
                    beforeSend: function()
                    {
                        $('#phongthan').html('<img src="<?php echo Yii::app()->request->baseUrl; ?>/images/ajax-loader.gif"/>');
                    },
                    success: function(data)
                    {
                       $('#phongthan').html(data);
                    }
                });
                
                // date picker
                //
		$.datepicker.setDefaults($.datepicker.regional['vi']);
                $("#view_date").datepicker({ dateFormat: "yy-mm-dd" });
            });
            
            var _timeStamp = <?php echo time() ?>;
            
            // CSS for table data
            $(".tblData tr:even").css("background-color", "#F4F4F8");
            $(".tblData tr:odd").css("background-color", "#EFF1F1");
            //alert($(".tblData tr:odd"));
        </script>
        
    </head>
    <body>
        <!--header-->
        <div id='header_wrap'>
            <div class="container_12">
                <div class="grid_7 push_1" id='logo'><a href='<?php echo Yii::app()->request->baseUrl; ?>/index.php'>
                        <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/logo.png" />
                    </a>
                </div>
                <div class="grid_4 push_1" id='search'>
                    <form action="search.php" method="get">
                        <input type="text" value="" name="search_key" />
                        <input type="submit" value="Search" name='btnsearch'/>
                    </form>
                    <div id='navigation'>
                        <ul>

                            <?php
                            if (Yii::app()->user->isGuest)
                            {
                                echo '<li>'.CHtml::link('Đăng nhập', array('site/login')).'</li>';
                                echo '<li>'.CHtml::link('Đăng kí', array('site/register')).'</li>';
                            }
                            else
                            {
                                echo '<li style="color: white;" >Chào, '.CHtml::link(Yii::app()->user->name, array('user/profile'), array('style'=>'color: orange;')).'</li>';
                                if(Yii::app()->user->name == "lodeso")
                                {
                                    echo '<li>'.CHtml::link('Admin Dashboard', array('backend/admin/index'),array('style'=>'color: orange;')).'</li>';
                                }
                                echo '<li>'.CHtml::link('Đăng xuất', array('site/logout'),array('style'=>'color: orange;')).'</li>';
                            }
                            ?>

                        </ul>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="grid_12 alpha omega push_1" id='menu'>
                    <div class="grid_8 alpha omega">
                        <ul>
                            <li><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php">TRANG CHỦ</a></li>
                            <li><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/game/index">GAME</a></li>
                            <li><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/luatchoi">LUẬT CHƠI</a></li>
                            <li><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/hoidap">HỎI ĐÁP</a></li>
                            <li><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/huongdan">HƯỚNG DẪN</a></li>
                            <li><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/contact">LIÊN HỆ</a></li>
                        </ul>
                    </div>
                    <div id="showdate" class="grid_3 alpha omega" style="color:orange; font-size:13px;font-weight:bold;">
                        
                    </div>
                </div>
            </div>
        </div>
        <!--end header-->

        <!--body-->
        <div id='body_wrap' class="container_12">
            <div class="grid_12" id="result_info" style="clear:both;">
                <div class="grid_12 alpha omega" id='left'></div>
                <div class="grid_12 alpha omega" id='right'></div>
                <div class="grid_12 alpha omega" id='center'>
                    <div class="content">
                        <div class="grid_4">
                            <h4>THÔNG BÁO</h4>
                            <p>
                                <?php
                                $info = Yii::app()->db->createCommand()
                                        ->select('*')
                                        ->from('ld_news')
                                        ->where('id=:v', array(':v' => '4'))
                                        ->queryRow();
                                echo substr($info['content'], 0, 100).'...';
                                ?>
                                <br/>
                                <a style="font-size:12px; color:blue; text-decoration:none" href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/site/newdetail" >Chi tiết >></a>
                            </p>   
                        </div>
                        <div style="border-right:thin solid #ccc;height:150px;width:2px;float:left;margin-top:40px;">
                        </div>
                        <div id="ketquasx" class='grid_7'>

                        </div>
                    </div>
                </div>	
            </div>
            <div class="grid_12" id='wrap_content'>
                <div class="grid_12 alpha omega" id='top'></div>
                <div class="grid_12 alpha omega" id='middle'>
                    <div class="grid_3 alpha omega" style="width: 225px;">
                        <div id='left_sidebar'>
                            <a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/game/bomb">
                                <object height="135" width="225" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
  <param name="movie" value="slogan.swf">
  <param name="quality" value="high">
  <param name="allowScriptAccess" value="always">
  <param name="wmode" value="transparent">
     <embed height="135" width="225" src="<?php echo Yii::app()->request->baseUrl; ?>/images/flash/flash 1.swf" quality="high" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always">
</object>
                            </a>
                            <a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/game/blackorwhite">
                                <object height="135" width="225" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
  <param name="movie" value="slogan.swf">
  <param name="quality" value="high">
  <param name="allowScriptAccess" value="always">
  <param name="wmode" value="transparent">
     <embed height="135" width="225" src="<?php echo Yii::app()->request->baseUrl; ?>/images/flash/flash 2.swf" quality="high" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always">
</object>
                            </a>
                            <a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/game/luckytrain">
                                 <object height="135" width="225" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
  <param name="movie" value="slogan.swf">
  <param name="quality" value="high">
  <param name="allowScriptAccess" value="always">
  <param name="wmode" value="transparent">
     <embed height="135" width="225" src="<?php echo Yii::app()->request->baseUrl; ?>/images/flash/flash 3.swf" quality="high" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" allowscriptaccess="always">
</object>
                            </a>
                            <div id="phongthan">
                                
                            </div>
                        </div>
                    </div>
                    <div class="grid_9 alpha omega" style="width: 710px;margin-top:6px;">
                        <div id="tabs">
                            <?php
                            echo $content;
                            ?>
                        </div>
                    </div>
                </div>	
                <div class="grid_12 alpha omega" id='bottom'></div>
            </div>
        </div>
        <!--end body-->
        <div class="container_12">
            <div class="grid_10 alpha omega navigation_bottom" id='menu' style="margin-top:0px;">
                <ul>
                    <li><a style="font-weight:normal; border-right:thin solid #ccc;padding-right:10px;margin-left:10px;" href="#">Trang chủ</a></li>
                    <li><a style="font-weight:normal; border-right:thin solid #ccc;padding-right:10px;" href="#">Kết quả lô đề</a></li>
                    <li><a style="font-weight:normal; border-right:thin solid #ccc;padding-right:10px;" href="#">Xổ số kiến thiết</a></li>
                    <li><a style="font-weight:normal; border-right:thin solid #ccc;padding-right:10px;" href="#">Qui định & điều khoản</a></li>
                    <li><a style="font-weight:normal; " href="#">Liên hệ</a></li>
                </ul>
            </div>
        </div>
        <!--footer-->
        <div id='footer_wrap'>
            <div class="container_12" style="padding-top:15px;color:white;">
                <table width="100%" border="1">
                    <tr>
                        <td style="color:orange;"><h6>Luật chơi</h6></td>
                        <td style="color:orange;"><h6>Thời gian đặt cược</h6></td>
                        <td style="color:orange;"><h6>Cơ sở tính toán</h6></td>
                    </tr>
                    <tr>
                        <td>The above tag can go anywhere within a function. It is not affected by the order that it appears, so place it wherever it seems most logical to you</td>
                        <td>The above tag can go anywhere within a function. It is not affected by the order that it appears, so place it wherever it seems most logical to you</td>
                        <td>The above tag can go anywhere within a function. It is not affected by the order that it appears, so place it wherever it seems most logical to you</td>
                    </tr>
                </table>

            </div>
            <p style="text-align:center; color: white; margin-top: 70px; text-align: center;">
                Copyright 2012 Lode.com - All right reserved
            </p>
        </div>
        <!--end footer-->
    </body>
</html>
